<?php
namespace Admin\Model;
use Think\Model\ViewModel;

class AllotViewModel extends ViewModel {
    public $viewFields = array(
    	'allot'=>array('id','sequence','old_code'=>'code','new_code','date','number','receive','sender','status','del','old_code','type'),
    	'code'=>array('goods_id','depot_id','supplier_id','price','_on'=>'allot.old_code=code.code'), 
    	'goods'=>array('name'=>'goods_name','xinghao','unit','guige','_on'=>'code.goods_id=goods.id'),
    	'depot'=>array('name'=>'depot_name','_on'=>'code.depot_id=depot.id'), 
    	'supplier'=>array('name'=>'supplier_name', '_on'=>'code.supplier_id=supplier.id'),
    	'new_depot'=>array('_table'=>"think_depot",'id'=>'new_depot_id','name'=>'new_depot_name','_on'=>'allot.new_depot_id=new_depot.id'), 
	); 
}